public class RA2SQL {
	
	public RA2SQL() {


	}

	public void translateRA2SQL(RAStruct ras) {

		ArrayList relation  = ras.relation;
		ArrayList attr_list = ras.attr_list;
		ArrayList cond_list = ras.cond_list;

		String query = "";
		
		query+="SELECT ";
		for( int i = 0; i < attr_list.size(); i++) {
		
			query+=attr_list.get(i) + ((i != attr_list.size()-1) ? " ," : "\n");
		
		}
		
		query+="FROM ";
		for( int i = 0; i < relation.size(); i++) {
			query+=relation.get(i) + ((i != relation.size()-1) ? " ," : "\n");
		}
		query+="WHERE ";
		for( int i = 0; i < cond_list.size(); i++) {

			if(cond_list.get(i).toLower() == "and")
				query+="AND ";
			if(cond_list.get(i).toLower() == "or")
				query+="OR ";
			query+=cond_list.get(i) + ((i != relation.size()-1_ ? " " : "\n");
		}	

		
	}

	
	public static void main(String[] arg) {

		RAStruct ras = new RAStruct();
		ras.attr_list.add(
		
	}

	
}
